package com.atguigu.userprofile.common.dao;

import com.atguigu.userprofile.common.bean.TaskTagRule;
import com.atguigu.userprofile.common.util.MySQLUtil;

import java.util.List;

public class TaskTagRuleDAO {

    public static List<TaskTagRule> getTagRuleList(String taskId){

        String sql ="select tt.*,ti.tag_name as sub_tag_value from task_tag_rule tt inner join tag_info ti on tt.sub_tag_id=ti.id where tt.task_id=" + taskId;

        List<TaskTagRule> taskTagRuleList = MySQLUtil.queryList(sql, TaskTagRule.class, true);
        return  taskTagRuleList;
    }
}
